package com.example.springbootmybatis.entity;

/**
 * @title: RestResult
 * @Author BanYunjian
 * @Date: 2021/9/5 14:39
 * @Version 1.0
 */
public class RestResult<T> {
    /**
     * 错误代码
     */
    private  String rspCode;
    /**
     * 错误信息
     */
    private String rspDesc;
    /**
     * 返回结果数据
     */
    private T data;

    private RestResult(){

    }

    public static <T> RestResult<T> newInstance(){
        return new RestResult<>();
    }

    public String getRspCode() {
        return rspCode;
    }

    public void setRspCode(String rspCode) {
        this.rspCode = rspCode;
    }

    public String getRspDesc() {
        return rspDesc;
    }

    public void setRspDesc(String rspDesc) {
        this.rspDesc = rspDesc;
    }

    public T getData() {
        return data;
    }

    public void setData(T data) {
        this.data = data;
    }
}
